package cn.interestingshop.mapper.goods;

import cn.interestingshop.entity.Goods;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface GoodsMapper {
    public Goods selectById(@Param("id") Integer id);
    public Integer save(Goods goods);
    public Integer deleteById(Integer id);
    public Integer update(Goods goods);
    public Integer updateStock(@Param("id")Integer id,@Param("buyNum") Integer buyNum);//修改库存

    public List<Goods> selectList(@Param("currentPageNo")Integer currentPageNo, @Param("pageSize")Integer pageSize,@Param("goodsName") String goodsName,@Param("categoryId") Integer categoryId);
    public Integer selectCount(@Param("goodsName")String goodsName,@Param("categoryId")Integer categoryId);
}
